$(function() {
  $.initPage(eLancoIndex.load.start);
});

var eLancoIndex = new BaseFrame();

eLancoIndex.addBlock();

//load module
eLancoIndex.load.addStart(function() {
  $.pageStart(_eLancoSettings);
  eLancoIndex.load.runTask();
});

eLancoIndex.load.addBind('createTitle', function() {
  var currentPage = $.getCurrentPage(_eLancoSettings.pageList);
  $('title').text(currentPage.title);
});

eLancoIndex.load.addBind('createNav', function() {
  var navList = $.getUserAuthorityList(_user.roleList, _eLancoSettings.authorityList, _eLancoSettings.pageList);
  $('#logout').on('click', $.logoff);
  $('#block-nav').createNavList(navList).removeClass('dn');
});
